<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>小组列表</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/statics/css/bootstrap.min.css">
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-sm-12" style="margin-bottom: 10px; ">
            <input type="button" value="添加小组" class="btn btn-sm btn-info" onclick="location.href='${pageContext.request.contextPath}/group/ShowClazzName'"/>
        </div>
        <div class="col-sm-12">
            <table class="table table-striped table-bordered table-hover">
                <tr>
                    <th>编号</th>
                    <th>组名称</th>
                    <th>班级名称</th>
                    <th>创建时间</th>
                    <th>小组标签</th>
                    <th>人数</th>
                    <th>操作</th>
                </tr>
                <%--展示小组+班级信息--%>
                <c:forEach var="g" items="${requestScope.groupAndClass}" varStatus="gc">
                    <tr>
                        <td>${gc.count}</td>
                        <td>${g.gname}</td>
                        <td>${g.clazz.cname}</td>
                        <td>
                        <fmt:formatDate value="${g.gtime}" pattern="yyyy年mm月dd日"></fmt:formatDate>
                        </td>
                        <td>帅哥</td>
                        <td>5</td>
                        <td><a href="${pageContext.request.contextPath}/group/dropGroup?group.gid=${g.gid}" class="btn btn-danger btn-sm">删除</a></td>
                    </tr>
                </c:forEach>

            </table>
        </div>
    </div>
</div>

</body>
</html>